package com.sensePlusVR.realGame;

public class VideoResolution {
		
	public static class videoResolution{
		private String sRresolution;
		private int    width;
		private int    height;
		private int    fps;
		
		public videoResolution(String res, int w, int h, int fps){
			this.sRresolution = res;
			this.width = w;
			this.height = h;
			this.fps = fps;
		}
		public int getWidth(){
			return width;
		}
		public int getHeight(){
			return height;
		}
		public int getFps(){
			return fps;
		}
		public String getsRresolution() {
			return sRresolution;
		}
		public void setsRresolution(String sRresolution) {
			this.sRresolution = sRresolution;
		}
		
	};
	
	private static videoResolution [] videoResTable = {
			/*720P*/
			new videoResolution("720P@15fps", 1280, 720, 15),
			new videoResolution("720P@30fps", 1280, 720, 30),
			new videoResolution("720P@60fps", 1280, 720, 60),
			/*1080P*/
			new videoResolution("1080P@15fps", 1920, 1080, 15),
			new videoResolution("1080P@30fps", 1920, 1080, 30),
			new videoResolution("1080P@60fps", 1920, 1080, 60),
			/*2560x1280*/
			new videoResolution("2560x1280@15fps", 2560, 1280, 15),
			new videoResolution("2560x1280@30fps", 2560, 1280, 30),
			new videoResolution("2560x1280@60fps", 2560, 1280, 60),
			/*2K*/
			new videoResolution("2K@30fps", 2560, 1440, 30),
			new videoResolution("2K@60fps", 2560, 1440, 60),
			/*4K*/
			new videoResolution("4K@30fps", 3840, 2160, 30),
			new videoResolution("4K@60fps", 3840, 2160, 60),
	};
	
	public static videoResolution getVideoResolution(String res){
		for (videoResolution vres:videoResTable){
			if (vres.getsRresolution().equals(res)){
				return vres;
			}
		}
		return null;
	}
}
